<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div>
        <p>当前 <span th:text="${pageInfo.cpage}"></span> 页,总 <span th:text="${pageInfo.totalPage}"></span> 页,共 <span th:text="${pageInfo.totalRow}"></span> 条记录</p>
        <a href="javascript:serach(1)" >首页</a>
        <span th:if="${pageInfo.cpage -1 > 0}">
            <a href="#" th:onclick="|serach(${pageInfo.cpage}-1)|">上一页</a>
        </span>
        <span th:if="${pageInfo.cpage -1 <= 0}">
           <a >上一页</a>
        </span>
        <span th:if="${pageInfo.cpage < pageInfo.totalPage}">
          <a href="#" th:onclick="|serach(${pageInfo.cpage+1})|">下一页</a>
        </span>
        <span th:if="${pageInfo.cpage==pageInfo.totalPage}">
            <a >下一页</a>
        </span>
        <a href="#" th:onclick="|serach(${pageInfo.totalPage})|">尾页</a>
    </div>
</body>
</html>